﻿using System;
using System.Runtime.Serialization;

namespace NetBay.Core.BusinessEntities.Workflow
{
    [KnownType(typeof(WorkflowGenericItem))]
    [KnownType(typeof(WorkflowDocument))]
    [DataContract]
    public abstract class WorkflowItem : ReturnObject
    {
        /// <summary>
        /// Gets or sets the type of the item.
        /// </summary>
        /// <value>The type of the item.</value>
        [DataMember]
        public abstract ItemType ItemType { get; set; }

        /// <summary>
        /// Get or set the Identifier
        /// </summary>
        [DataMember]
        public long Identifier { get; set; }

        /// <summary>
        /// Gets or sets the name of the document.
        /// </summary>
        /// <value>The name of the document.</value>
        [DataMember]
        public string Name { get; set; }

        #region Constructors

        public WorkflowItem()
        {
        }

        /// <summary>
        /// Only for error
        /// </summary>
        /// <param name="ErrorMessage"></param>
        public WorkflowItem(string errorMessage, Exception applicationException = null)
            : base(errorMessage, applicationException)
        {
        }


        #endregion
    }
}
